import { IconFont, IconType } from '@/components/AntdIcon';
import { useModel } from 'umi';
import { Button } from './Button';
import { ButtonProps } from 'antd';

export function ShowEdge(props: ButtonProps) {
  const { isShowEdge, setIsShowEdge } = useModel('StageCanvas');
  return (
    <>
      <Button
        icon={<IconFont type={IconType.EdgeCorner} />}
        onClick={() => setIsShowEdge(!isShowEdge)}
        {...props}
      >
        {!isShowEdge ? '显示' : '隐藏'}封边
      </Button>
    </>
  );
}
